package com.stepshop.sys.bean;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;

import org.apache.commons.beanutils.BeanUtils;

import com.fasterxml.jackson.databind.util.BeanUtil;

public class SysArea implements Serializable{
    private Long id;

    private Long code;

    private String name;

    private Integer levelId;

    private Long parentId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCode() {
        return code;
    }

    public void setCode(Long code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLevelId() {
        return levelId;
    }

    public void setLevelId(Integer levelId) {
        this.levelId = levelId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }
    @Override
    public boolean equals(Object obj) {
    	try {
			if((Long.parseLong(BeanUtils.getProperty(obj, "id"))==this.id.longValue())){
				return true;
			}
		} catch (Exception e) {
		}
    	return false;
    }
}